package com.spark.lola.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.spark.lola.entity.SupplierToken;
import com.spark.lola.entity.pur.OrderInfo;
import com.spark.lola.feign.LogisticsFeignService;
import com.spark.lola.logistics.entity.CarSubscribe;
import com.spark.lola.support.common.util.ResponseBean;
import com.spark.lola.support.mybatis.common.QueryCondition;
import com.spark.lola.support.mybatis.entity.PageParam;
import com.spark.lola.support.mybatis.entity.QueryParam;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: DengYeJun
 * @Date: 2020/5/21 9:58
 */
@Api(value = "/api/logistics/", tags = "物流相关")
@RequestMapping("/api/logistics/")
@RestController
public class LogisticsController {
    @Autowired
    private LogisticsFeignService logisticsFeignService;

    @ApiOperation(value = "查询回头车")
    @RequestMapping(value = "/car",method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    public ResponseBean index(@RequestBody QueryParam<CarSubscribe> queryBean, @SessionAttribute SupplierToken tokenUser){
        IPage<CarSubscribe> page = logisticsFeignService.findPage(queryBean);
        return ResponseBean.success(page);
    }

}
